<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;

Route::domain('api', 'api');
Route::post('user', 'user/login');
//获取验证码
Route::get('code/:time/:token/:username/:is_exist', 'code/get_code');
//用户注册
Route::post('user/register', 'user/register');
//用户登录
Route::post('user/login', 'user/login');
//用户上传头像
Route::post('user/icon', 'user/upload_head_img');
//用户修改密码
Route::post('user/change_pwd', 'user/change_pwd');
//找回密码
Route::post('user/find_pwd', 'user/find_pwd');
//绑定邮箱
Route::post('user/bind_email', 'user/bind_email');
//绑定手机
Route::post('user/bind_phone', 'user/bind_phone');
//设置昵称
Route::post('user/set_nickname', 'user/set_nickname');
/** 文章 **/
//新增文章
Route::post('article','article/add_article');
//查询文章列表
Route::get('articles/:time/:token/:user_id/[:num]/[:page]','article/article_list');
//查询文章详情
Route::get('article/:time/:token/:article_id','article/article_detail');
//更新文章
Route::put('article','article/update_article');
//删除文章
Route::delete('article/:time/:token/:article_id','article/del_article');
